<template>
  <view>
    <!--#ifdef APP-PLUS-->
    <view class="lz-status_bar">
      <view class="lz-top_view"></view>
    </view>
    <!--#endif-->
    <!-- #ifndef MP-WEIXIN -->
    <view class="kaoshi-head">
      <view class="kaoshi-head-top">
        <view class="kaoshi-head-left"
              @tap="$navigateBack">
          <view class="iconfont icon-zuojiantou"></view>
        </view>
        <view class="kaoshi-head-m">错题集</view>
      </view>
    </view>
    <!--#endif-->
    <view class="index-content">
      <view class="question-nav" @tap="$openrul('/pages/my/wrongQuestion/index')">
        <view class="question-nav-l">
          <view class="question-nav-title">题库错题</view>
          <view class="question-nav-txt">个人错题 查缺补漏</view>
        </view>
        <view>
          <image :src="static_media.img01" class="question-nav-r"></image>
        </view>
      </view>
      <view class="question-nav"
            @tap="$openrul('/pages/my/examWrongQuestion/index')">
        <view class="question-nav-l">
          <view class="question-nav-title">考试错题</view>
          <view class="question-nav-txt">考试错题 快速提分</view>
        </view>
        <view>
          <image :src="static_media.img02" class="question-nav-r"></image>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import { mapState } from "vuex";

export default {
  data() {
    return {
      exam_config_list: []
    };
  },
  onLoad() {},
  onShow() {},
  mounted() {},
  computed: {
    ...mapState(["subject"]),
    static_media () {
      return {
        img01: this.$myConfig.localMedia + '/static/img/learn-icon1.png',
        img02: this.$myConfig.localMedia + '/static/img/learn-icon2.png'
      }
    }
  },
  components: {},
  methods: {
    async get_exam_config() {
      let res = await this.$myHttp.post({
        url: this.$myHttp.urlMap.kaoshilist,
        data: {
          subject_id: this.subject.id,
          searchdb: {
            type: 1 // 1 章节 2 模拟 3 易错 4 错题 5 vip
          }
        },
        needLogin: true
      });
      if (res.code === 1) {
        this.exam_config_list = res.data.rows;
      }
    }
  }
};
</script>

<style>
  page {
    background: #f6f7f9;
  }
.index-content {
  padding-top: 15px;
  width: 92%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
}
.question-nav {
  display: flex;
  background: #fff;
  border-radius: 8px;
  font-size: 12px;
  width: 48%;
  align-items: flex-end;
  justify-content: space-between;
}
.question-nav-l{padding:14px 0 28px 13px;}
.question-nav-r{
  width: 30px;
  height: 30px;
  margin-right: 4px;
  margin-bottom: 4px;
}
.question-nav-title {
  font-size: 17px;
  color: #2f2f2f;
}
.question-nav-txt {
  color: #b0b0b0;
  padding-top: 6px;
}
</style>
